package com.zlcx.tz.live.constant;

/**
 * <p></p>
 * <PRE>
 * <BR>    修改记录
 * <BR>-----------------------------------------------
 * <BR>    修改日期         修改人          修改内容
 * </PRE>
 * @author zl
 * @date Created in 2019/4/18 14:43
 * @version 1.0
 * @copyright: Copyright (c) founders
 */

public enum OpperateState {

    WaitDeal("WaitDeal", "投诉中", 1),
    Dealt("Dealt", "已经处理", 2),
    NoNeedDeal("NoNeedDeal", "不需要处理", 3);

    OpperateState(String info, String tips, int code) {
        this.info = info;
        this.tips = tips;
        this.code = code;
    }

    public  static OpperateState create(Integer code) {
        if (null == code) {
            return null;
        }
        for (OpperateState statusEnum : OpperateState.values()) {
            if (code == statusEnum.getCode()) {
                return statusEnum;
            }
        }
        return null;
    }

    private String info;
    private String tips;
    private int code;

    public String getInfo() {
        return info;
    }

    public void setInfo(String info) {
        this.info = info;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getTips() {
        return tips;
    }

    public void setTips(String tips) {
        this.tips = tips;
    }

    public static OpperateState getComplaintType(int code) {
        for (OpperateState field : OpperateState.values()) {
            if (code == field.getCode()) {
                return field;
            }
        }
        return null;
    }
}
